<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page import="br.com.seuimovelnamao.Util, org.springframework.util.StringUtils"%>

<%
request.setAttribute("semmapa", 1);
String more = "<script src=\"/js/jquery.maskedinput.min.js\"></script>" +
		"<script src=\"/js/jquery.livequery.js\"></script>" +
		"<script src=\"/js/jquery.numeric.js\"></script>" +
		"<script src=\"/js/jquery.price_format.1.3.js\"></script>";
request.setAttribute("more", more);
%>

<c:import url="/views/includes/header.jsp" />

<div class="container">
	<div class="content" style="padding: 20px; margin-bottom: 20px">
		<div style="border-top: #ccc solid 1px" id="divtop">
			<form action="cadastrarCorretor" method="post"
				class="formulario-arredondado cadastro"
				id="form">
				<h3>Dados do Corretor</h3>
				<table border="0" cellpadding="5">
					<tr>
						<td>Nome:</td>
						<td><input type="text" name="nome" id="nome" style="float: left;" class="fieldvalidate" />
								<div id="nome-error" style="float: left;" class="errormessage"></div></td>
					</tr>
					<tr>
						<td>Sobrenome:</td>
						<td><input type="text" name="sobrenome" id="sobrenome" /></td>
					</tr>
					<tr>
						<td>Telefone:</td>
						<td><input type="text" name="telefone" id="telefone" /></td>
					</tr>
					<tr>
						<td>Celular:</td>
						<td><input type="text" name="celular" id="celular" /></td>
					</tr>
					<tr>
						<td>Acesso:</td>
						<td>
							<select name="acesso" id="acesso">
								<option value="<%=Util.ACESSO_ALUGUEL%>"><%=StringUtils.capitalize(Util.ACESSO_ALUGUEL)%></option>
								<option value="<%=Util.ACESSO_VENDA%>"><%=StringUtils.capitalize(Util.ACESSO_VENDA)%></option>
								<option value="<%=Util.ACESSO_TODOS%>"><%=StringUtils.capitalize(Util.ACESSO_TODOS)%></option>
							</select>
						</td>
					</tr>
					<tr>
						<td>Email:</td>
						<td><input type="text" name="email" id="email" style="float: left;" class="fieldvalidate" />
							<div id="email-error" style="float: left;" class="errormessage"></div></td>
					</tr>
				</table>
				<input type="button" value="Cadastrar" onclick="validaCorretor()" />
			</form>		
		</div>
		
		<script type="text/javascript">
			$('#telefone').mask('(99)9999-9999');
			$('#celular').mask('(99)9999-9999');
		</script>
		
<c:import url="/views/includes/footer.jsp" />